import {Service} from "adajs";
import Input from "../../../../controls/form/input";
import HosSelect from "../../../../controls/form/hosselect";

class LodgeService extends Service {
    defaultData() {
        return {
            title: "设置",
            form: {
                fields: [
                    {type: Input, name: "yiyuan", label: "医院名称", inputType: "text", required: true},
                    {type: Input, name: "ksbc", label: "科室病床", inputType: "text", required: true},
                    {type: Input, name: "rysj", label: "入院时间", inputType: "date", required: true},
                    {type: Input, name: "bq", label: "病情", inputType: "text", required: true},
                    {type: Input, name: "phr", label: "陪护人", inputType: "text", required: true},
                    {type: Input, name: "phrdh", label: "陪护人电话", inputType: "text", required: true},
                    {
                        type: HosSelect, name: "sfcy", label: "是否出院", options: []
                    }
                ],
                btns: [
                    {action: "submit", name: "保存"}
                ]
            }
        };
    }

    onupdate(current, data) {
        Object.assign(current, data);
    }
}

export default LodgeService;